package com.seraph.zys.dao.impl;

import com.seraph.bi.suite.support.domain.pagination.PageBox;
import com.seraph.bi.suite.support.domain.pagination.PageObject;
import com.seraph.zys.dao.PcPatientVisitPriceDAO;
import com.seraph.zys.dao.domain.PcPatientVisitPrice;
import com.seraph.zys.dao.domain.PcPatientVisitPriceExample;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;
import org.springframework.stereotype.Repository;

@Repository
public class PcPatientVisitPriceDAOImpl extends SqlMapClientDaoSupport implements PcPatientVisitPriceDAO {

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pc_patient_visit_price
     *
     * @abatorgenerated Tue Apr 17 10:39:40 CST 2012
     */
    public PcPatientVisitPriceDAOImpl() {
        super();
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pc_patient_visit_price
     *
     * @abatorgenerated Tue Apr 17 10:39:40 CST 2012
     */
    public Integer insert(PcPatientVisitPrice record) {
        Object newKey = getSqlMapClientTemplate().insert("pc_patient_visit_price.abatorgenerated_insert", record);
        return (Integer) newKey;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pc_patient_visit_price
     *
     * @abatorgenerated Tue Apr 17 10:39:40 CST 2012
     */
    public int updateByPrimaryKey(PcPatientVisitPrice record) {
        int rows = getSqlMapClientTemplate().update("pc_patient_visit_price.abatorgenerated_updateByPrimaryKey", record);
        return rows;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pc_patient_visit_price
     *
     * @abatorgenerated Tue Apr 17 10:39:40 CST 2012
     */
    public int updateByPrimaryKeySelective(PcPatientVisitPrice record) {
        int rows = getSqlMapClientTemplate().update("pc_patient_visit_price.abatorgenerated_updateByPrimaryKeySelective", record);
        return rows;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pc_patient_visit_price
     *
     * @abatorgenerated Tue Apr 17 10:39:40 CST 2012
     */
    public List selectByExample(PcPatientVisitPriceExample example, String orderByClause) {
        Map parms = getExampleParms(example);
        if (orderByClause != null) {
            parms.put("ABATOR_ORDER_BY_CLAUSE", orderByClause);
        }
        List list = getSqlMapClientTemplate().queryForList("pc_patient_visit_price.abatorgenerated_selectByExample", parms);
        return list;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pc_patient_visit_price
     *
     * @abatorgenerated Tue Apr 17 10:39:40 CST 2012
     */
    public List selectByExample(PcPatientVisitPriceExample example) {
        return selectByExample(example, null);
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pc_patient_visit_price
     *
     * @abatorgenerated Tue Apr 17 10:39:40 CST 2012
     */
    public PcPatientVisitPrice selectByPrimaryKey(Integer id) {
        PcPatientVisitPrice key = new PcPatientVisitPrice();
        key.setId(id);
        PcPatientVisitPrice record = (PcPatientVisitPrice) getSqlMapClientTemplate().queryForObject("pc_patient_visit_price.abatorgenerated_selectByPrimaryKey", key);
        return record;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pc_patient_visit_price
     *
     * @abatorgenerated Tue Apr 17 10:39:40 CST 2012
     */
    public int deleteByExample(PcPatientVisitPriceExample example) {
        int rows = getSqlMapClientTemplate().delete("pc_patient_visit_price.abatorgenerated_deleteByExample", getExampleParms(example));
        return rows;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pc_patient_visit_price
     *
     * @abatorgenerated Tue Apr 17 10:39:40 CST 2012
     */
    public int deleteByPrimaryKey(Integer id) {
        PcPatientVisitPrice key = new PcPatientVisitPrice();
        key.setId(id);
        int rows = getSqlMapClientTemplate().delete("pc_patient_visit_price.abatorgenerated_deleteByPrimaryKey", key);
        return rows;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pc_patient_visit_price
     *
     * @abatorgenerated Tue Apr 17 10:39:40 CST 2012
     */
    private Map getIDExampleParms(PcPatientVisitPriceExample example) {
        Map parms = new HashMap();
        switch (example.getId_Indicator()) {
        case PcPatientVisitPriceExample.EXAMPLE_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_ID_NULL", "Y");
            } else {
                parms.put("AND_ID_NULL", "Y");
            }
            break;
        case PcPatientVisitPriceExample.EXAMPLE_NOT_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_ID_NOT_NULL", "Y");
            } else {
                parms.put("AND_ID_NOT_NULL", "Y");
            }
            break;
        case PcPatientVisitPriceExample.EXAMPLE_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_ID_EQUALS", "Y");
            } else {
                parms.put("AND_ID_EQUALS", "Y");
            }
            parms.put("id", example.getId());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_NOT_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_ID_NOT_EQUALS", "Y");
            } else {
                parms.put("AND_ID_NOT_EQUALS", "Y");
            }
            parms.put("id", example.getId());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_GREATER_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_ID_GT", "Y");
            } else {
                parms.put("AND_ID_GT", "Y");
            }
            parms.put("id", example.getId());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_GREATER_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_ID_GE", "Y");
            } else {
                parms.put("AND_ID_GE", "Y");
            }
            parms.put("id", example.getId());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_LESS_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_ID_LT", "Y");
            } else {
                parms.put("AND_ID_LT", "Y");
            }
            parms.put("id", example.getId());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_LESS_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_ID_LE", "Y");
            } else {
                parms.put("AND_ID_LE", "Y");
            }
            parms.put("id", example.getId());
            break;
        }
        return parms;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pc_patient_visit_price
     *
     * @abatorgenerated Tue Apr 17 10:39:40 CST 2012
     */
    private Map getFISCAL_YEARExampleParms(PcPatientVisitPriceExample example) {
        Map parms = new HashMap();
        switch (example.getFiscalYear_Indicator()) {
        case PcPatientVisitPriceExample.EXAMPLE_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FISCAL_YEAR_NULL", "Y");
            } else {
                parms.put("AND_FISCAL_YEAR_NULL", "Y");
            }
            break;
        case PcPatientVisitPriceExample.EXAMPLE_NOT_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FISCAL_YEAR_NOT_NULL", "Y");
            } else {
                parms.put("AND_FISCAL_YEAR_NOT_NULL", "Y");
            }
            break;
        case PcPatientVisitPriceExample.EXAMPLE_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FISCAL_YEAR_EQUALS", "Y");
            } else {
                parms.put("AND_FISCAL_YEAR_EQUALS", "Y");
            }
            parms.put("fiscalYear", example.getFiscalYear());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_NOT_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FISCAL_YEAR_NOT_EQUALS", "Y");
            } else {
                parms.put("AND_FISCAL_YEAR_NOT_EQUALS", "Y");
            }
            parms.put("fiscalYear", example.getFiscalYear());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_GREATER_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FISCAL_YEAR_GT", "Y");
            } else {
                parms.put("AND_FISCAL_YEAR_GT", "Y");
            }
            parms.put("fiscalYear", example.getFiscalYear());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_GREATER_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FISCAL_YEAR_GE", "Y");
            } else {
                parms.put("AND_FISCAL_YEAR_GE", "Y");
            }
            parms.put("fiscalYear", example.getFiscalYear());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_LESS_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FISCAL_YEAR_LT", "Y");
            } else {
                parms.put("AND_FISCAL_YEAR_LT", "Y");
            }
            parms.put("fiscalYear", example.getFiscalYear());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_LESS_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FISCAL_YEAR_LE", "Y");
            } else {
                parms.put("AND_FISCAL_YEAR_LE", "Y");
            }
            parms.put("fiscalYear", example.getFiscalYear());
            break;
        }
        return parms;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pc_patient_visit_price
     *
     * @abatorgenerated Tue Apr 17 10:39:40 CST 2012
     */
    private Map getFROM_AREAExampleParms(PcPatientVisitPriceExample example) {
        Map parms = new HashMap();
        switch (example.getFromArea_Indicator()) {
        case PcPatientVisitPriceExample.EXAMPLE_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FROM_AREA_NULL", "Y");
            } else {
                parms.put("AND_FROM_AREA_NULL", "Y");
            }
            break;
        case PcPatientVisitPriceExample.EXAMPLE_NOT_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FROM_AREA_NOT_NULL", "Y");
            } else {
                parms.put("AND_FROM_AREA_NOT_NULL", "Y");
            }
            break;
        case PcPatientVisitPriceExample.EXAMPLE_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FROM_AREA_EQUALS", "Y");
            } else {
                parms.put("AND_FROM_AREA_EQUALS", "Y");
            }
            parms.put("fromArea", example.getFromArea());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_NOT_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FROM_AREA_NOT_EQUALS", "Y");
            } else {
                parms.put("AND_FROM_AREA_NOT_EQUALS", "Y");
            }
            parms.put("fromArea", example.getFromArea());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_GREATER_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FROM_AREA_GT", "Y");
            } else {
                parms.put("AND_FROM_AREA_GT", "Y");
            }
            parms.put("fromArea", example.getFromArea());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_GREATER_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FROM_AREA_GE", "Y");
            } else {
                parms.put("AND_FROM_AREA_GE", "Y");
            }
            parms.put("fromArea", example.getFromArea());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_LESS_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FROM_AREA_LT", "Y");
            } else {
                parms.put("AND_FROM_AREA_LT", "Y");
            }
            parms.put("fromArea", example.getFromArea());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_LESS_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FROM_AREA_LE", "Y");
            } else {
                parms.put("AND_FROM_AREA_LE", "Y");
            }
            parms.put("fromArea", example.getFromArea());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_LIKE:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FROM_AREA_LIKE", "Y");
            } else {
                parms.put("AND_FROM_AREA_LIKE", "Y");
            }
            parms.put("fromArea", example.getFromArea());
            break;
        }
        return parms;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pc_patient_visit_price
     *
     * @abatorgenerated Tue Apr 17 10:39:40 CST 2012
     */
    private Map getSORT_IDExampleParms(PcPatientVisitPriceExample example) {
        Map parms = new HashMap();
        switch (example.getSortId_Indicator()) {
        case PcPatientVisitPriceExample.EXAMPLE_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SORT_ID_NULL", "Y");
            } else {
                parms.put("AND_SORT_ID_NULL", "Y");
            }
            break;
        case PcPatientVisitPriceExample.EXAMPLE_NOT_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SORT_ID_NOT_NULL", "Y");
            } else {
                parms.put("AND_SORT_ID_NOT_NULL", "Y");
            }
            break;
        case PcPatientVisitPriceExample.EXAMPLE_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SORT_ID_EQUALS", "Y");
            } else {
                parms.put("AND_SORT_ID_EQUALS", "Y");
            }
            parms.put("sortId", example.getSortId());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_NOT_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SORT_ID_NOT_EQUALS", "Y");
            } else {
                parms.put("AND_SORT_ID_NOT_EQUALS", "Y");
            }
            parms.put("sortId", example.getSortId());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_GREATER_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SORT_ID_GT", "Y");
            } else {
                parms.put("AND_SORT_ID_GT", "Y");
            }
            parms.put("sortId", example.getSortId());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_GREATER_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SORT_ID_GE", "Y");
            } else {
                parms.put("AND_SORT_ID_GE", "Y");
            }
            parms.put("sortId", example.getSortId());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_LESS_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SORT_ID_LT", "Y");
            } else {
                parms.put("AND_SORT_ID_LT", "Y");
            }
            parms.put("sortId", example.getSortId());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_LESS_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SORT_ID_LE", "Y");
            } else {
                parms.put("AND_SORT_ID_LE", "Y");
            }
            parms.put("sortId", example.getSortId());
            break;
        }
        return parms;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pc_patient_visit_price
     *
     * @abatorgenerated Tue Apr 17 10:39:40 CST 2012
     */
    private Map getPATIENT_NAMEExampleParms(PcPatientVisitPriceExample example) {
        Map parms = new HashMap();
        switch (example.getPatientName_Indicator()) {
        case PcPatientVisitPriceExample.EXAMPLE_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_PATIENT_NAME_NULL", "Y");
            } else {
                parms.put("AND_PATIENT_NAME_NULL", "Y");
            }
            break;
        case PcPatientVisitPriceExample.EXAMPLE_NOT_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_PATIENT_NAME_NOT_NULL", "Y");
            } else {
                parms.put("AND_PATIENT_NAME_NOT_NULL", "Y");
            }
            break;
        case PcPatientVisitPriceExample.EXAMPLE_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_PATIENT_NAME_EQUALS", "Y");
            } else {
                parms.put("AND_PATIENT_NAME_EQUALS", "Y");
            }
            parms.put("patientName", example.getPatientName());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_NOT_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_PATIENT_NAME_NOT_EQUALS", "Y");
            } else {
                parms.put("AND_PATIENT_NAME_NOT_EQUALS", "Y");
            }
            parms.put("patientName", example.getPatientName());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_GREATER_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_PATIENT_NAME_GT", "Y");
            } else {
                parms.put("AND_PATIENT_NAME_GT", "Y");
            }
            parms.put("patientName", example.getPatientName());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_GREATER_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_PATIENT_NAME_GE", "Y");
            } else {
                parms.put("AND_PATIENT_NAME_GE", "Y");
            }
            parms.put("patientName", example.getPatientName());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_LESS_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_PATIENT_NAME_LT", "Y");
            } else {
                parms.put("AND_PATIENT_NAME_LT", "Y");
            }
            parms.put("patientName", example.getPatientName());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_LESS_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_PATIENT_NAME_LE", "Y");
            } else {
                parms.put("AND_PATIENT_NAME_LE", "Y");
            }
            parms.put("patientName", example.getPatientName());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_LIKE:
            if (example.isCombineTypeOr()) {
                parms.put("OR_PATIENT_NAME_LIKE", "Y");
            } else {
                parms.put("AND_PATIENT_NAME_LIKE", "Y");
            }
            parms.put("patientName", example.getPatientName());
            break;
        }
        return parms;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pc_patient_visit_price
     *
     * @abatorgenerated Tue Apr 17 10:39:40 CST 2012
     */
    private Map getSUSPICIOUS_CHECK_PRICEExampleParms(PcPatientVisitPriceExample example) {
        Map parms = new HashMap();
        switch (example.getSuspiciousCheckPrice_Indicator()) {
        case PcPatientVisitPriceExample.EXAMPLE_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SUSPICIOUS_CHECK_PRICE_NULL", "Y");
            } else {
                parms.put("AND_SUSPICIOUS_CHECK_PRICE_NULL", "Y");
            }
            break;
        case PcPatientVisitPriceExample.EXAMPLE_NOT_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SUSPICIOUS_CHECK_PRICE_NOT_NULL", "Y");
            } else {
                parms.put("AND_SUSPICIOUS_CHECK_PRICE_NOT_NULL", "Y");
            }
            break;
        case PcPatientVisitPriceExample.EXAMPLE_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SUSPICIOUS_CHECK_PRICE_EQUALS", "Y");
            } else {
                parms.put("AND_SUSPICIOUS_CHECK_PRICE_EQUALS", "Y");
            }
            parms.put("suspiciousCheckPrice", example.getSuspiciousCheckPrice());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_NOT_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SUSPICIOUS_CHECK_PRICE_NOT_EQUALS", "Y");
            } else {
                parms.put("AND_SUSPICIOUS_CHECK_PRICE_NOT_EQUALS", "Y");
            }
            parms.put("suspiciousCheckPrice", example.getSuspiciousCheckPrice());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_GREATER_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SUSPICIOUS_CHECK_PRICE_GT", "Y");
            } else {
                parms.put("AND_SUSPICIOUS_CHECK_PRICE_GT", "Y");
            }
            parms.put("suspiciousCheckPrice", example.getSuspiciousCheckPrice());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_GREATER_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SUSPICIOUS_CHECK_PRICE_GE", "Y");
            } else {
                parms.put("AND_SUSPICIOUS_CHECK_PRICE_GE", "Y");
            }
            parms.put("suspiciousCheckPrice", example.getSuspiciousCheckPrice());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_LESS_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SUSPICIOUS_CHECK_PRICE_LT", "Y");
            } else {
                parms.put("AND_SUSPICIOUS_CHECK_PRICE_LT", "Y");
            }
            parms.put("suspiciousCheckPrice", example.getSuspiciousCheckPrice());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_LESS_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SUSPICIOUS_CHECK_PRICE_LE", "Y");
            } else {
                parms.put("AND_SUSPICIOUS_CHECK_PRICE_LE", "Y");
            }
            parms.put("suspiciousCheckPrice", example.getSuspiciousCheckPrice());
            break;
        }
        return parms;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pc_patient_visit_price
     *
     * @abatorgenerated Tue Apr 17 10:39:40 CST 2012
     */
    private Map getCHEST_PRICEExampleParms(PcPatientVisitPriceExample example) {
        Map parms = new HashMap();
        switch (example.getChestPrice_Indicator()) {
        case PcPatientVisitPriceExample.EXAMPLE_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_CHEST_PRICE_NULL", "Y");
            } else {
                parms.put("AND_CHEST_PRICE_NULL", "Y");
            }
            break;
        case PcPatientVisitPriceExample.EXAMPLE_NOT_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_CHEST_PRICE_NOT_NULL", "Y");
            } else {
                parms.put("AND_CHEST_PRICE_NOT_NULL", "Y");
            }
            break;
        case PcPatientVisitPriceExample.EXAMPLE_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_CHEST_PRICE_EQUALS", "Y");
            } else {
                parms.put("AND_CHEST_PRICE_EQUALS", "Y");
            }
            parms.put("chestPrice", example.getChestPrice());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_NOT_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_CHEST_PRICE_NOT_EQUALS", "Y");
            } else {
                parms.put("AND_CHEST_PRICE_NOT_EQUALS", "Y");
            }
            parms.put("chestPrice", example.getChestPrice());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_GREATER_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_CHEST_PRICE_GT", "Y");
            } else {
                parms.put("AND_CHEST_PRICE_GT", "Y");
            }
            parms.put("chestPrice", example.getChestPrice());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_GREATER_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_CHEST_PRICE_GE", "Y");
            } else {
                parms.put("AND_CHEST_PRICE_GE", "Y");
            }
            parms.put("chestPrice", example.getChestPrice());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_LESS_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_CHEST_PRICE_LT", "Y");
            } else {
                parms.put("AND_CHEST_PRICE_LT", "Y");
            }
            parms.put("chestPrice", example.getChestPrice());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_LESS_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_CHEST_PRICE_LE", "Y");
            } else {
                parms.put("AND_CHEST_PRICE_LE", "Y");
            }
            parms.put("chestPrice", example.getChestPrice());
            break;
        }
        return parms;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pc_patient_visit_price
     *
     * @abatorgenerated Tue Apr 17 10:39:40 CST 2012
     */
    private Map getSPUTUM_PRICEExampleParms(PcPatientVisitPriceExample example) {
        Map parms = new HashMap();
        switch (example.getSputumPrice_Indicator()) {
        case PcPatientVisitPriceExample.EXAMPLE_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SPUTUM_PRICE_NULL", "Y");
            } else {
                parms.put("AND_SPUTUM_PRICE_NULL", "Y");
            }
            break;
        case PcPatientVisitPriceExample.EXAMPLE_NOT_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SPUTUM_PRICE_NOT_NULL", "Y");
            } else {
                parms.put("AND_SPUTUM_PRICE_NOT_NULL", "Y");
            }
            break;
        case PcPatientVisitPriceExample.EXAMPLE_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SPUTUM_PRICE_EQUALS", "Y");
            } else {
                parms.put("AND_SPUTUM_PRICE_EQUALS", "Y");
            }
            parms.put("sputumPrice", example.getSputumPrice());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_NOT_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SPUTUM_PRICE_NOT_EQUALS", "Y");
            } else {
                parms.put("AND_SPUTUM_PRICE_NOT_EQUALS", "Y");
            }
            parms.put("sputumPrice", example.getSputumPrice());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_GREATER_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SPUTUM_PRICE_GT", "Y");
            } else {
                parms.put("AND_SPUTUM_PRICE_GT", "Y");
            }
            parms.put("sputumPrice", example.getSputumPrice());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_GREATER_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SPUTUM_PRICE_GE", "Y");
            } else {
                parms.put("AND_SPUTUM_PRICE_GE", "Y");
            }
            parms.put("sputumPrice", example.getSputumPrice());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_LESS_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SPUTUM_PRICE_LT", "Y");
            } else {
                parms.put("AND_SPUTUM_PRICE_LT", "Y");
            }
            parms.put("sputumPrice", example.getSputumPrice());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_LESS_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SPUTUM_PRICE_LE", "Y");
            } else {
                parms.put("AND_SPUTUM_PRICE_LE", "Y");
            }
            parms.put("sputumPrice", example.getSputumPrice());
            break;
        }
        return parms;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pc_patient_visit_price
     *
     * @abatorgenerated Tue Apr 17 10:39:40 CST 2012
     */
    private Map getBLOOD_PRICEExampleParms(PcPatientVisitPriceExample example) {
        Map parms = new HashMap();
        switch (example.getBloodPrice_Indicator()) {
        case PcPatientVisitPriceExample.EXAMPLE_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_BLOOD_PRICE_NULL", "Y");
            } else {
                parms.put("AND_BLOOD_PRICE_NULL", "Y");
            }
            break;
        case PcPatientVisitPriceExample.EXAMPLE_NOT_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_BLOOD_PRICE_NOT_NULL", "Y");
            } else {
                parms.put("AND_BLOOD_PRICE_NOT_NULL", "Y");
            }
            break;
        case PcPatientVisitPriceExample.EXAMPLE_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_BLOOD_PRICE_EQUALS", "Y");
            } else {
                parms.put("AND_BLOOD_PRICE_EQUALS", "Y");
            }
            parms.put("bloodPrice", example.getBloodPrice());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_NOT_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_BLOOD_PRICE_NOT_EQUALS", "Y");
            } else {
                parms.put("AND_BLOOD_PRICE_NOT_EQUALS", "Y");
            }
            parms.put("bloodPrice", example.getBloodPrice());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_GREATER_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_BLOOD_PRICE_GT", "Y");
            } else {
                parms.put("AND_BLOOD_PRICE_GT", "Y");
            }
            parms.put("bloodPrice", example.getBloodPrice());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_GREATER_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_BLOOD_PRICE_GE", "Y");
            } else {
                parms.put("AND_BLOOD_PRICE_GE", "Y");
            }
            parms.put("bloodPrice", example.getBloodPrice());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_LESS_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_BLOOD_PRICE_LT", "Y");
            } else {
                parms.put("AND_BLOOD_PRICE_LT", "Y");
            }
            parms.put("bloodPrice", example.getBloodPrice());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_LESS_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_BLOOD_PRICE_LE", "Y");
            } else {
                parms.put("AND_BLOOD_PRICE_LE", "Y");
            }
            parms.put("bloodPrice", example.getBloodPrice());
            break;
        }
        return parms;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pc_patient_visit_price
     *
     * @abatorgenerated Tue Apr 17 10:39:40 CST 2012
     */
    private Map getLIVER_KIDNEY_PRICEExampleParms(PcPatientVisitPriceExample example) {
        Map parms = new HashMap();
        switch (example.getLiverKidneyPrice_Indicator()) {
        case PcPatientVisitPriceExample.EXAMPLE_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_LIVER_KIDNEY_PRICE_NULL", "Y");
            } else {
                parms.put("AND_LIVER_KIDNEY_PRICE_NULL", "Y");
            }
            break;
        case PcPatientVisitPriceExample.EXAMPLE_NOT_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_LIVER_KIDNEY_PRICE_NOT_NULL", "Y");
            } else {
                parms.put("AND_LIVER_KIDNEY_PRICE_NOT_NULL", "Y");
            }
            break;
        case PcPatientVisitPriceExample.EXAMPLE_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_LIVER_KIDNEY_PRICE_EQUALS", "Y");
            } else {
                parms.put("AND_LIVER_KIDNEY_PRICE_EQUALS", "Y");
            }
            parms.put("liverKidneyPrice", example.getLiverKidneyPrice());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_NOT_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_LIVER_KIDNEY_PRICE_NOT_EQUALS", "Y");
            } else {
                parms.put("AND_LIVER_KIDNEY_PRICE_NOT_EQUALS", "Y");
            }
            parms.put("liverKidneyPrice", example.getLiverKidneyPrice());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_GREATER_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_LIVER_KIDNEY_PRICE_GT", "Y");
            } else {
                parms.put("AND_LIVER_KIDNEY_PRICE_GT", "Y");
            }
            parms.put("liverKidneyPrice", example.getLiverKidneyPrice());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_GREATER_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_LIVER_KIDNEY_PRICE_GE", "Y");
            } else {
                parms.put("AND_LIVER_KIDNEY_PRICE_GE", "Y");
            }
            parms.put("liverKidneyPrice", example.getLiverKidneyPrice());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_LESS_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_LIVER_KIDNEY_PRICE_LT", "Y");
            } else {
                parms.put("AND_LIVER_KIDNEY_PRICE_LT", "Y");
            }
            parms.put("liverKidneyPrice", example.getLiverKidneyPrice());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_LESS_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_LIVER_KIDNEY_PRICE_LE", "Y");
            } else {
                parms.put("AND_LIVER_KIDNEY_PRICE_LE", "Y");
            }
            parms.put("liverKidneyPrice", example.getLiverKidneyPrice());
            break;
        }
        return parms;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pc_patient_visit_price
     *
     * @abatorgenerated Tue Apr 17 10:39:40 CST 2012
     */
    private Map getECG_PRICEExampleParms(PcPatientVisitPriceExample example) {
        Map parms = new HashMap();
        switch (example.getEcgPrice_Indicator()) {
        case PcPatientVisitPriceExample.EXAMPLE_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_ECG_PRICE_NULL", "Y");
            } else {
                parms.put("AND_ECG_PRICE_NULL", "Y");
            }
            break;
        case PcPatientVisitPriceExample.EXAMPLE_NOT_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_ECG_PRICE_NOT_NULL", "Y");
            } else {
                parms.put("AND_ECG_PRICE_NOT_NULL", "Y");
            }
            break;
        case PcPatientVisitPriceExample.EXAMPLE_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_ECG_PRICE_EQUALS", "Y");
            } else {
                parms.put("AND_ECG_PRICE_EQUALS", "Y");
            }
            parms.put("ecgPrice", example.getEcgPrice());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_NOT_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_ECG_PRICE_NOT_EQUALS", "Y");
            } else {
                parms.put("AND_ECG_PRICE_NOT_EQUALS", "Y");
            }
            parms.put("ecgPrice", example.getEcgPrice());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_GREATER_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_ECG_PRICE_GT", "Y");
            } else {
                parms.put("AND_ECG_PRICE_GT", "Y");
            }
            parms.put("ecgPrice", example.getEcgPrice());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_GREATER_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_ECG_PRICE_GE", "Y");
            } else {
                parms.put("AND_ECG_PRICE_GE", "Y");
            }
            parms.put("ecgPrice", example.getEcgPrice());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_LESS_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_ECG_PRICE_LT", "Y");
            } else {
                parms.put("AND_ECG_PRICE_LT", "Y");
            }
            parms.put("ecgPrice", example.getEcgPrice());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_LESS_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_ECG_PRICE_LE", "Y");
            } else {
                parms.put("AND_ECG_PRICE_LE", "Y");
            }
            parms.put("ecgPrice", example.getEcgPrice());
            break;
        }
        return parms;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pc_patient_visit_price
     *
     * @abatorgenerated Tue Apr 17 10:39:40 CST 2012
     */
    private Map getOTHER_PRICEExampleParms(PcPatientVisitPriceExample example) {
        Map parms = new HashMap();
        switch (example.getOtherPrice_Indicator()) {
        case PcPatientVisitPriceExample.EXAMPLE_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_OTHER_PRICE_NULL", "Y");
            } else {
                parms.put("AND_OTHER_PRICE_NULL", "Y");
            }
            break;
        case PcPatientVisitPriceExample.EXAMPLE_NOT_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_OTHER_PRICE_NOT_NULL", "Y");
            } else {
                parms.put("AND_OTHER_PRICE_NOT_NULL", "Y");
            }
            break;
        case PcPatientVisitPriceExample.EXAMPLE_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_OTHER_PRICE_EQUALS", "Y");
            } else {
                parms.put("AND_OTHER_PRICE_EQUALS", "Y");
            }
            parms.put("otherPrice", example.getOtherPrice());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_NOT_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_OTHER_PRICE_NOT_EQUALS", "Y");
            } else {
                parms.put("AND_OTHER_PRICE_NOT_EQUALS", "Y");
            }
            parms.put("otherPrice", example.getOtherPrice());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_GREATER_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_OTHER_PRICE_GT", "Y");
            } else {
                parms.put("AND_OTHER_PRICE_GT", "Y");
            }
            parms.put("otherPrice", example.getOtherPrice());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_GREATER_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_OTHER_PRICE_GE", "Y");
            } else {
                parms.put("AND_OTHER_PRICE_GE", "Y");
            }
            parms.put("otherPrice", example.getOtherPrice());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_LESS_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_OTHER_PRICE_LT", "Y");
            } else {
                parms.put("AND_OTHER_PRICE_LT", "Y");
            }
            parms.put("otherPrice", example.getOtherPrice());
            break;
        case PcPatientVisitPriceExample.EXAMPLE_LESS_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_OTHER_PRICE_LE", "Y");
            } else {
                parms.put("AND_OTHER_PRICE_LE", "Y");
            }
            parms.put("otherPrice", example.getOtherPrice());
            break;
        }
        return parms;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pc_patient_visit_price
     *
     * @abatorgenerated Tue Apr 17 10:39:40 CST 2012
     */
    private Map getExampleParms(PcPatientVisitPriceExample example) {
        Map parms = new HashMap();
        parms.putAll(getIDExampleParms(example));
        parms.putAll(getFISCAL_YEARExampleParms(example));
        parms.putAll(getFROM_AREAExampleParms(example));
        parms.putAll(getSORT_IDExampleParms(example));
        parms.putAll(getPATIENT_NAMEExampleParms(example));
        parms.putAll(getSUSPICIOUS_CHECK_PRICEExampleParms(example));
        parms.putAll(getCHEST_PRICEExampleParms(example));
        parms.putAll(getSPUTUM_PRICEExampleParms(example));
        parms.putAll(getBLOOD_PRICEExampleParms(example));
        parms.putAll(getLIVER_KIDNEY_PRICEExampleParms(example));
        parms.putAll(getECG_PRICEExampleParms(example));
        parms.putAll(getOTHER_PRICEExampleParms(example));
        return parms;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pc_patient_visit_price
     *
     * @abatorgenerated Tue Apr 17 10:39:40 CST 2012
     */
    public int selectCountByExample(PcPatientVisitPriceExample example) {
        Map parms = getExampleParms(example);
        int count = ((Integer)getSqlMapClientTemplate().queryForObject("pc_patient_visit_price.abatorgenerated_selectCountByExample", parms)).intValue();
        return count;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pc_patient_visit_price
     *
     * @abatorgenerated Tue Apr 17 10:39:40 CST 2012
     */
    public PageBox selectByExampleWithPaging(PcPatientVisitPriceExample example, int pageSize, int pageNum, String orderByClause) {
        Map parms = getExampleParms(example);
        if (orderByClause != null) {
            parms.put("ABATOR_ORDER_BY_CLAUSE", orderByClause);
        }
        PageBox pageBox = new PageBox();
        PageObject pageObject = new PageObject();
        pageObject.setPageSize(pageSize);
        pageObject.setPageIndex(pageNum);
        int itemAmount = selectCountByExample(example);
        pageObject.setItemAmount(itemAmount);
        List pageList = null;
        if (pageObject.getBeginIndex() <= pageObject.getItemAmount()) {
            pageList = (getSqlMapClientTemplate().queryForList("pc_patient_visit_price.abatorgenerated_selectByExample", parms, pageObject.getBeginIndex() - 1, pageSize));
        }
        pageBox.setPageObject(pageObject);
        pageBox.setPageList(pageList);
        return pageBox;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pc_patient_visit_price
     *
     * @abatorgenerated Tue Apr 17 10:39:40 CST 2012
     */
    public PageBox selectByExampleWithPaging(PcPatientVisitPriceExample example, int pageSize, int pageNum) {
        return selectByExampleWithPaging(example, pageSize, pageNum, null);
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pc_patient_visit_price
     *
     * @abatorgenerated Tue Apr 17 10:39:40 CST 2012
     */
    public int updateByPrimaryKeyForCgs(PcPatientVisitPrice record) {
        int rows = getSqlMapClientTemplate().update("pc_patient_visit_price.abatorgenerated_updateByPrimaryKeyForCgs", record);
        return rows;
    }
}